package com.cssl.feign;

import com.cssl.feign.impl.UsersServiceImpl;
import com.cssl.pojo.Users;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

//@FeignClient(name = "PROVIDER-USER")
@FeignClient(name = "PROVIDER-USER",fallback = UsersServiceImpl.class)
public interface UsersService {
    @RequestMapping("/map")
    public Map<String,String> map(@RequestParam Map<String,String> map);

    @PostMapping("/findUsers")
    public Users find(@RequestBody Users user);

    @PostMapping("/login")
    public String login(
            @RequestParam(name = "username") String username,
            @RequestParam(name = "password") String password);
}
